Next | Prev | Up | Top | Contents | Index

Data Transfer Options

When reading or writing data, you have two design options:

All read/write requests are done using DMA. The "scatter/gather" support of DSRQ_IOV is presently restricted to only one memory segment, so it is not greatly different from single-buffer I/O. If you elect to use it, the iov_t structure is declared in sys/iov.h (see also the part of the read(2) reference page that deals with the readv() function).

During a direct transfer using either a single buffer or scatter/gather, the data buffer spaces are locked in memory.

The maximum amount of data you can transfer in one operation is set by the host adapter driver for the bus, and can be retrieved with an ioctl() (see "Testing the Driver Configuration"). The maximum length for a buffered transfer is returned by the same ioctl(). It can be less than the direct-transfer size because there may be a limit on the size of kernel memory that can be allocated.


Next | Prev | Up | Top | Contents | Index